package cn.lingyangwl.agile.msg.push.api.constatnts;

import cn.lingyangwl.framework.cache.core.key.ICacheKey;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.concurrent.TimeUnit;

/**
 * @author shenguangyang
 */
@Getter
@AllArgsConstructor
public enum MsgPushCacheKey implements ICacheKey {
    /**
     * 消息推送保存记录
     * key - arg1: 消息id
     * value: 上一次保存记录的数据库主键
     */
    MSG_PUSH_SAVE("msg_push_save:%s", 60, TimeUnit.MINUTES);
    private final String key;
    private final int expire;
    private final TimeUnit unit;
    ;

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public int getExpire() {
        return expire;
    }

    @Override
    public TimeUnit getUnit() {
        return unit;
    }
}
